package com.shrct.businessprocess.purchase.impl;

import com.shrct.businessprocess.product.RCIdentifiableProductEntry;
import com.shrct.businessprocess.purchase.RCIdentifiableProductDeliverItem;
import com.shrct.businessprocess.purchase.RCIdentifiableProductDeliverItemDAO;
import edu.fudan.mylang.pf.BaseDAOService;
import edu.fudan.mylang.pf.IGenericQuery;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.purchase.RCIdentifiableProductDeliverItemDAO")
public class RCIdentifiableProductDeliverItemDAOImpl extends BaseDAOService<RCIdentifiableProductDeliverItem> implements RCIdentifiableProductDeliverItemDAO {
  public RCIdentifiableProductDeliverItem findProductDeliver4Product(final RCIdentifiableProductEntry product) {
    IGenericQuery<RCIdentifiableProductDeliverItem> query=getObjectFactory().createGenericQuery(RCIdentifiableProductDeliverItem.class,"select e from com.shrct.businessprocess.purchase.impl.RCIdentifiableProductDeliverItemImpl as e   where ((e.product) = (:product)) and  e.active = 1      ").setParameter("product",product);
    RCIdentifiableProductDeliverItem _uniqueResult = query.uniqueResult();
    return _uniqueResult;
  }
}
